import wordcloud
import imageio
with open('新时代中国特色社会主义.txt',encoding='utf-8') as f:
              string = f.read()

mk = imageio.imread("queen.png")

w = wordcloud.WordCloud(background_color="white",
                        mask=mk,
                        font_path='C/Windows/Fonts/simhei.ttf',
                        contour_width=1,
                        contour_color='steelblue')
w.generate(string)
w.to_file('output9-contour.png')
